package com.pbd.shared;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name="party")
public class PARTY implements Serializable {

	public PARTY() {

	}

	@Id
	@GenericGenerator(name = "generator", strategy = "increment")
    @GeneratedValue(generator = "generator")
	@Column(name = "partyId")
	private Long partyId;
	
	@Column(name = "name", nullable = false, length = 100)
	private String name;
	
	@Column(name = "type", nullable = false, length = 10)
	private String type;
	
	@Column(name = "webSite", nullable = true, length = 50)
	private String webSite;
	
	@Column(name = "contactPerson", nullable = true, length = 50)
	private String contactPerson;

	@Column(name = "keywords", nullable = true, length = 200)
	private String keywords;
	
	
	@Column(name = "joinedDate")
	private java.util.Date joinedDate;
	
	@Column(name = "createdDate")
	private java.util.Date createdDate;
	
	@Column(name = "updatedDate")
	private java.util.Date updatedDate;
	
	@OneToMany(cascade = CascadeType.ALL,fetch=FetchType.LAZY)
	@JoinColumn(name = "partyId")
	private Set<PARTYCONTACT> partyContacts = new HashSet<PARTYCONTACT>();

	@OneToMany(cascade = CascadeType.ALL,fetch=FetchType.LAZY)
	@JoinColumn(name = "partyId")
	private Set<CORRESPONDENCEDETAIL> correspondence = new HashSet<CORRESPONDENCEDETAIL>();

	@OneToMany(cascade = CascadeType.ALL,fetch=FetchType.LAZY)
	@JoinColumn(name = "partyId")
	private Set<ALBUMMASTER> albumRelation = new HashSet<ALBUMMASTER>();
	
	@OneToMany(cascade = CascadeType.ALL,fetch=FetchType.LAZY)
	@JoinColumn(name = "partyId")
	private Set<BUSINESSCATEGORYRELATION> businessCategoryRelation = new HashSet<BUSINESSCATEGORYRELATION>();
	
	@Column(name = "isActive")
	private java.lang.Boolean isActive;

	public Long getPartyId() {
		return partyId;
	}


	public void setPartyId(Long partyId) {
		this.partyId = partyId;
	}


	public String getName() {
		return name;
	}


	public void setName(String name) {
		this.name = name;
	}


	public String getType() {
		return type;
	}


	public void setType(String type) {
		this.type = type;
	}


	public String getWebSite() {
		return webSite;
	}


	public void setWebSite(String webSite) {
		this.webSite = webSite;
	}


	public java.util.Date getJoinedDate() {
		return joinedDate;
	}


	public void setJoinedDate(java.util.Date joinedDate) {
		this.joinedDate = joinedDate;
	}


	public java.util.Date getCreatedDate() {
		return createdDate;
	}


	public void setCreatedDate(java.util.Date createdDate) {
		this.createdDate = createdDate;
	}


	public java.util.Date getUpdatedDate() {
		return updatedDate;
	}


	public void setUpdatedDate(java.util.Date updatedDate) {
		this.updatedDate = updatedDate;
	}



	public String getKeywords() {
		return keywords;
	}


	public void setKeywords(String keywords) {
		this.keywords = keywords;
	}


	public Set<PARTYCONTACT> getPartyContacts() {
		return partyContacts;
	}


	public void setPartyContacts(Set<PARTYCONTACT> partyContacts) {
		this.partyContacts = partyContacts;
	}


	public String getContactPerson() {
		return contactPerson;
	}


	public void setContactPerson(String contactPerson) {
		this.contactPerson = contactPerson;
	}


	public Set<CORRESPONDENCEDETAIL> getCorrespondence() {
		return correspondence;
	}


	public void setCorrespondence(Set<CORRESPONDENCEDETAIL> correspondence) {
		this.correspondence = correspondence;
	}




	public Set<ALBUMMASTER> getAlbumRelation() {
		return albumRelation;
	}


	public void setAlbumRelation(Set<ALBUMMASTER> albumRelation) {
		this.albumRelation = albumRelation;
	}


	public java.lang.Boolean getIsActive() {
		return isActive;
	}


	public void setIsActive(java.lang.Boolean isActive) {
		this.isActive = isActive;
	}


	public Set<BUSINESSCATEGORYRELATION> getBusinessCategoryRelation() {
		return businessCategoryRelation;
	}


	public void setBusinessCategoryRelation(Set<BUSINESSCATEGORYRELATION> businessCategoryRelation) {
		this.businessCategoryRelation = businessCategoryRelation;
	}
	
	
}
